//
//  LocationGetObj.h
//  JxCarios
//
//  Created by xcq on 15/1/31.
//  Copyright (c) 2015年 xiongchuanqi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ConfigDefine.h"

@protocol LocationDelegate <NSObject>

- (void)getLocationSuccess:(BMKUserLocation *)userLocation;

- (void)getLocationFail:(NSError *)error;

- (void)willStartLocation;

- (void)didStopLocation;

- (void)getLocationWithHeadingIsChange:(BMKUserLocation *)userLocation;
@end

@protocol AddressGeo <NSObject>

- (void)onGetGeoCodeResultSuccess:(BMKGeoCodeSearch *)searcher result:(BMKGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error;

- (void)onGetReverseGeoCodeResultSuccess:(BMKGeoCodeSearch *)searcher result:(BMKReverseGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error;

@end


@interface LocationGetObj : NSObject <BMKLocationServiceDelegate,BMKGeoCodeSearchDelegate>
@property (nonatomic ,retain) BMKLocationService *locService;
@property (nonatomic ,retain) BMKGeoCodeSearch *geoSearch;

@property (nonatomic ,weak) id<AddressGeo> geoDelegate;
@property (nonatomic ,weak) id<LocationDelegate> delegate;

+ (LocationGetObj *)locationObj;

- (void)startLocation;
- (void)stopLocation;

- (BOOL)startReverseGeoCode:(BMKReverseGeoCodeOption *)option;
- (BOOL)startGeoCode:(BMKGeoCodeSearchOption *)option;
@end
